#include "SteeringSeekBehaviour.h"

SteeringSeekBehaviour::SteeringSeekBehaviour()
{
}

SteeringBehaviourOutput* SteeringSeekBehaviour::runSeek(Point2D position, double linearSpeed, double maxLinearAcc, Point2D target){
    SteeringBehaviourOutput* output = new SteeringBehaviourOutput();

    Vector2D direction(target - position);
    direction.normalize();
    direction.setX(direction.x()*maxLinearAcc);
    direction.setY(direction.y()*maxLinearAcc);

    output->setLinear(direction.x(),direction.y());

    return output;
}
